import java.util.Scanner;

public class J20230809_1 {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String shork = scanner.nextLine();
        int count=0;
        int countt = 1;
        System.out.println("三次输入机会，超过三次自动退出");
        while(count!=3){
            System.out.println("请输入你的密码");
            String a = scanner.nextLine();
            if(shork.equals(a)){
                System.out.println("密码正确");
                break;
            }
            else{
                System.out.println("密码错误");
                count++;
                countt++;
            }
        }
        if(countt==4){
            System.out.println("退出输入");
        }

    }
}
